---
artifact: apiserver
from: {{ $.Images.BASE_GOLANG_20_ALPINE_DEV }}
git:
- add: /{{ $.ModulePath }}modules/040-node-manager/images/bashible-apiserver
  to: /src
  excludePaths:
  - "**/*.md"
  - "**/*.yaml"
  - hack
  stageDependencies:
    install:
    - go.mod
    - go.sum
    setup:
    - go.mod
    - go.sum
    - "**/*.go"
mount:
- fromPath: ~/go-pkg-cache
  to: /go/pkg
shell:
  install:
  - cd /src
  - GOPROXY={{ $.GOPROXY }} go mod download
  setup:
  - cd /src
  - CGO_ENABLED=0 GOPROXY={{ $.GOPROXY }} GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bashible-apiserver .
  - chown 64535:64535 bashible-apiserver
  - chmod 0700 bashible-apiserver
---
image: {{ .ModuleName }}/{{ .ImageName }}
fromImage: common/distroless
docker:
  ENTRYPOINT: ["/bashible-apiserver", "--tls-cipher-suites", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"]
import:
- artifact: apiserver
  add: /src/bashible-apiserver
  to: /bashible-apiserver
  before: setup
git:
{{ .Files.Get (printf "tools/build_includes/candi-%s.yaml" .Env) }}
- add: /{{ .ModulePath }}candi/bashible
  to: /deckhouse/candi/bashible
  stageDependencies:
    beforeSetup:
    - "*"
  includePaths:
  - bundles
  - common-steps
  - bashible.sh.tpl
  - bootstrap.sh.tpl
  excludePaths:
  - "**/cluster-bootstrap"
- add: /{{ .ModulePath }}candi/cloud-providers
  to: /deckhouse/candi/cloud-providers
  stageDependencies:
    beforeSetup:
    - "*"
  includePaths:
  - "*/bashible"
